package com.example.tencentdemo.service.Impl;


import com.example.tencentdemo.Mapper.ChatGroupMapper;
import com.example.tencentdemo.entity.ChatGroup;
import com.example.tencentdemo.service.ChatGroupService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.UUID;

@Service
public class ChatGroupImpl implements ChatGroupService {
    @Autowired
    private ChatGroupMapper ChatGroupMapper;

    @Override
    public int insertChatGroup(ChatGroup ChatGroup) {
        ChatGroup.setGroup_id(UUID.randomUUID().toString());
        return ChatGroupMapper.insertChatGroup(ChatGroup);
    }

    @Override
    public ChatGroup selectChatGroupById(String activity_id) {
        ChatGroup s = ChatGroupMapper.selectChatGroupById(activity_id);
        return s;
    }

    @Override
    public void  deleteChatGroupById(String group_id) {
        ChatGroupMapper.deleteChatGroupById(group_id);
    }


}
